<template>
	<view>
		<!-- 房屋信息 -->
		<view class="xinxi">{{name}}</view>
		<view class="xiaoquda">
			<!-- 小区 -->
			<view class="uni-list-cell" v-for="(item,index) in data" :key="index" @click="changebuilding(index)">
				<view class="uni-list-cell-left">{{item.name}}</view>
				<view class="uni-list-cell-db">
					<view class="">
						<image class="you-img" src="../../static/images/index/右.png" mode=""></image>
					</view>
					
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			index:{
				type:String,
				require:true
			},
			name:{
				type:String,
				require:true
			},
			data:{
				type:Array,
				require:true
			}
		},
		name:"selecthouse",
		data() {
			return {
				
			};
		},
		methods:{
			changebuilding(selectindex){
				let mindex = this.index+','+selectindex
				//子向父传值
				this.$emit('getselectbid',mindex)
			}
		}
	}
</script>

<style lang="less">
@import url('../../static/css/housePage/housepage2/housepage2.css');
</style>